package cn.appsys.dao.datadictionary;

import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import cn.appsys.pojo.DataDictionary;

public interface DataDictionaryMapper {
	
	public List<DataDictionary> getDataDictionaryList(@Param("typeCode")String typeCode)throws Exception;

	/**
	 * 根据typenama和valuenama查询数据字典
	 * @param map
	 * @return
	 */
	public List<DataDictionary> selectDataDictionaryForPageByTypeNameAndValueName(Map<String,Object> map);

	/**
	 * 根据条件查询数据字典的记录数
	 * @param map
	 * @return
	 */
	public int selectDataDictionaryCount(Map<String,Object> map);

	/**
	 * 查询数据字典typename字段
	 * @return
	 */
	public List<DataDictionary> selectDataDictionaryTypeNameForDistinct();

	/**
	 * 根据typename字段查询数据字典
	 * @param typeName
	 * @return
	 */
	public List<DataDictionary> selectDataDictionaryByTypeName(String typeName);

	/**
	 * 添加数据字典
	 * @param dataDictionary
	 * @return
	 */
	public int insertDataDictionary(DataDictionary dataDictionary);

	/**
	 * 根据id删除数据字典记录
	 * @param id
	 * @return
	 */
	public int deleteDataDictionaryById(int id);

	/**
	 * 修改数据字典
	 * @param dataDictionary
	 * @return
	 */
	public int updateDataDictionaryById(DataDictionary dataDictionary);

	/**
	 * 根据id查询数据字典
	 * @param id
	 * @return
	 */
	public DataDictionary selectDataDictionaryById(int id);

}
